<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------


use think\Route;

Route::get('admin/login','admin/Login/index');
Route::get('admin/index','admin/Index/index');
Route::get('admin/welcome','admin/Index/welcome');

/* Base */
Route::get('admin/upload','admin/Base/upload');


/* Admin */
Route::get('admin/admin_add','admin/Admin/admin_add');
Route::get('admin/admin_cate','admin/Admin/admin_cate');
Route::get('admin/admin_edit','admin/Admin/admin_edit');
Route::get('admin/admin_list','admin/Admin/admin_list');
Route::get('admin/admin_role','admin/Admin/admin_role');
Route::get('admin/role_add','admin/Admin/role_add');

Route::post('admin/do_login','admin/Login/login');
Route::get('admin/logout','admin/Login/logout');

/* Member */
Route::get('admin/member_add','admin/Member/member_add');
Route::get('admin/member_del','admin/Member/member_del');
Route::get('admin/member_edit','admin/Member/member_edit');
Route::get('admin/member_list','admin/Member/member_list');
Route::get('admin/member_password','admin/Member/member_password');
Route::get('admin/member_detail/:id','admin/Member/member_detail');

/* Order */
Route::get('admin/order_list','admin/Order/order_list');
Route::get('admin/order_add','admin/Order/order_add');
Route::get('admin/order_detail/:id','admin/Order/order_detail');
Route::post('admin/send_out/','admin/Order/send_out');

/* Goods */
Route::get('admin/goods_add','admin/Good/goods_add');
Route::get('admin/goods_edit/:id','admin/Good/goods_edit');
Route::get('admin/goods_list','admin/Good/goods_list');

Route::post('admin/goods_add','admin/Good/goods_add');
Route::post('admin/goods_edit','admin/Good/goods_edit');
Route::post('admin/goods_del','admin/Good/goods_delete');
Route::post('admin/ajax_status','admin/Good/ajax_status');
/* Category */
Route::get('admin/category_add','admin/Category/category_add');
Route::get('admin/category_edit/:id','admin/Category/category_edit');
Route::get('admin/category_list','admin/Category/category_list');

Route::post('admin/category_add','admin/Category/category_add');
Route::post('admin/category_del','admin/Category/category_delete');
Route::post('admin/category_edit','admin/Category/category_edit');


/////////////////////////////////////////////////////////////////////////////////////


Route::get('api/:version/banner/:id','api/:version.Index/banner');
Route::get('api/:version/themes','api/:version.Index/themes');
Route::get('api/:version/new','api/:version.Index/new_products');
Route::get('api/:version/theme/:id','api/:version.Theme/index');
Route::get('api/:version/product/:id','api/:version.Product/index');
Route::get('api/:version/category/all','api/:version.Category/index');
Route::get('api/:version/category/products','api/:version.Category/getCateProducts');
Route::post('api/:version/cart/add','api/:version.Cart/addCart');
Route::get('api/:version/cart','api/:version.Cart/index');
Route::post('api/:version/cart/counts','api/:version.Cart/counts');
Route::get('api/:version/del_cart/:id','api/:version.Cart/delCart');


Route::get('api/:version/order/create','api/:version.Order/store');
Route::get('api/:version/order/index/:id','api/:version.Order/index');
Route::post('api/:version/order/confirm','api/:version.Order/confirmOrder');
Route::get('api/:version/order/all','api/:version.Order/getAllOrders');
Route::get('api/:version/order/take/:id','api/:version.Order/takeGoods');
Route::get('api/:version/order/cancel/:id','api/:version.Order/cancelOrder');

Route::post('api/:version/user/login','api/:version.User/getWxLogin');
Route::get('api/:version/user/address','api/:version.Address/index');
Route::post('api/:version/user/address/add','api/:version.Address/store');
Route::get('api/:version/address/edit/:id','api/:version.Address/getDetail');
Route::post('api/:version/address/update','api/:version.Address/modify');
Route::get('api/:version/address/del/:id','api/:version.Address/del');